package pipesentity;

import java.io.Serializable;

import org.json.JSONException;
import org.json.JSONObject;

public class Tgt implements Serializable {
	
	public String getModuleid() {
		return moduleid;
	}

	public String getId() {
		return id;
	}

	private String moduleid;
	private String id;

	public Tgt( String id, String moduleid )
	{
		this.id = id;
		this.moduleid = moduleid;
	}
	
	public Tgt( JSONObject json ) {

		try {
			this.id = json.getString("id");
			this.moduleid = json.getString("moduleid");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
}

	public JSONObject getJSONObject()
	{
		JSONObject json = new JSONObject();
		try {
			// populate the values
			json.put("id", id);
			json.put("moduleid", moduleid);
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return json;
	}
}
